package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 * @author hua
 * @since 2025-01-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_rakuten_mark_record")
@NoArgsConstructor
public class RakutenMarkRecordDo extends Model<RakutenMarkRecordDo> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("request_id")
    private String requestId;

    @TableField("type")
    private String type;

    /**
     * 0 待请求，1请求成功 2请求不存在
     */
    @TableField("status")
    private Integer status;

    @TableField("store_id")
    private Long storeId;

    @TableField("company_id")
    private Long companyId;

    @TableField(value = "delete_flag", fill = FieldFill.INSERT)
    @TableLogic
    private Integer deleteFlag;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @TableField("create_by")
    private Long createBy;

    @TableField("request_count")
    private Integer requestCount;

    public RakutenMarkRecordDo(String type, String requestId, Long storeId, Long createBy, Long companyId) {
        this.type = type;
        this.requestId = requestId;
        this.storeId = storeId;
        this.createBy = createBy;
        this.companyId = companyId;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
